<ui:fragment
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:p="http://primefaces.prime.com.tr/ui">

    <p:dialog header="#{bundle.Editar_categoria}" draggable="true" widgetVar="categoria_edit">
        <h:form id="categoria_editF">
            <p:messages id="msgs"/>
            <h:panelGrid columns="2" style="width:100%;text-align:left;">
                <h:outputLabel value="#{bundle.ID}" />
                <h:outputText value="#{categoriaController.categoria.id}" />
                <h:outputLabel value="#{bundle.Nome}" />
                <h:inputText value="#{categoriaController.categoria.nome}" size="20" maxlength="255"/>
                <h:outputLabel value="#{bundle.Descricao}" />
                <h:inputTextarea value="#{categoriaController.categoria.descricao}" cols="10" rows="5" />
            </h:panelGrid>
            <h:panelGrid columns="2" width="100%">
                <p:commandButton value="#{bundle.Salvar}"  action="#{categoriaController.EditarCategoria}" ajax="true" update="categoria_editF"/>
                <p:commandButton value="#{bundle.Cancelar}" action="#{categoriaController.NovaCategoria}"  ajax="true" onclick="categoria_edit.hide();" update="categoria_editF" />
            </h:panelGrid>
        </h:form>
    </p:dialog>
</ui:fragment>